import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class UDPDemo5 {
	public static void main(String[] args) throws IOException {
		DatagramSocket socket = new DatagramSocket();
    	String str = "I love you!";
    	DatagramPacket packet = new DatagramPacket(str.getBytes(),str.length() , InetAddress.getByName("localhost"), 8889);
    	socket.send(packet);
    	socket.close();
	}
}
